package com.kmproject.haifu.mvp.ui.adapter;

import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jess.arms.utils.ArmsUtils;
import com.kmproject.haifu.R;
import com.kmproject.haifu.mvp.model.entity.resbean.HouseRentShowInfoBean;

import java.util.List;

public class HouseRentShowInfoAdapter extends BaseQuickAdapter<HouseRentShowInfoBean, BaseViewHolder> {
    public HouseRentShowInfoAdapter(@Nullable List<HouseRentShowInfoBean> data) {
        super(R.layout.houserentshowinfo_item,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, HouseRentShowInfoBean item) {
        helper.<TextView>getView(R.id.houserentshowinfo_item_content_txt).setText(item.getContent());
        helper.<TextView>getView(R.id.houserentshowinfo_item_title_txt).setText(item.getTitle());
        if (item.getTitle().contains("可短租")||item.getTitle().contains("装让费"))
        {
            helper.<TextView>getView(R.id.houserentshowinfo_item_content_txt).setTextColor(ArmsUtils.getColor(mContext,R.color.color_FF3A3A));
        }else {
            helper.<TextView>getView(R.id.houserentshowinfo_item_content_txt).setTextColor(ArmsUtils.getColor(mContext,R.color.color_191919));

        }
    }
}
